using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace fenk.Sistema
{
    public partial class Dicts : mvLibrary.BaseForm
    {
        public Dicts()
        {
            InitializeComponent();
        }

        private void Dicts_Load(object sender, EventArgs e)
        {
            toolBox.Visible = false;
            groupBox1.Enabled = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (mvTextBox1.Text == "")
            {
                MessageBox.Show("Falta ingresar archivo");
                mvTextBox1.Focus();
                return;
            }
                 if (mvTextBox2.Text == "")
            {
                MessageBox.Show("Falta ingresar item ID");
                mvTextBox2.Focus();
                return;
            }
            ItemId = mvTextBox1.Text + "*" + mvTextBox2.Text;
            CallProgram("READ.DICT.ITEM", 1, 1);
            groupBox1.Enabled = true;
            FillControls(panelData);
            mvTextBox3.Focus();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            CallProgram("SAVE.DICT.ITEM", 1, 1);
            CancelItem();
            groupBox1.Enabled = false;
            mvTextBox1.ResetText();
            mvTextBox2.ResetText();
            mvTextBox1.Focus();

        }

        private void button3_Click(object sender, EventArgs e)
        {
            CancelItem();
            groupBox1.Enabled = false;
            mvTextBox1.ResetText();
            mvTextBox2.ResetText();
            mvTextBox1.Focus();

        }
    }
}

